package demo.springboot;

import demo.springboot.Controller.GitlabConfig;
import demo.springboot.Tools.Tool_3;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.core.env.Environment;
import org.springframework.util.ResourceUtils;

import java.io.*;
import java.net.InetAddress;
import java.util.Properties;

/*
 * Spring Boot 应用启动类
 */
@SpringBootApplication
public class RootApplication {



    public static void main(String[] args) throws IOException {
        SpringApplication.run(RootApplication.class, args);

        String IPv4_address = InetAddress.getLocalHost().getHostAddress();
        System.out.println( "http://" + IPv4_address);  // >>>  192.168.1.102

//		InputStream in = new BufferedInputStream(new FileInputStream("src/main/resources/application.properties"));
//		Properties p = new Properties();
//		p.load(in);
//		String server_port = p.getProperty("server.port");
//		String WEB_site = "访问地址:  http://" + IPv4_address + ":" + server_port;
//		String Local_WEB_site = "访问地址:  http://127.0.0.1" + ":" + server_port;
//		System.out.println(WEB_site);
//		System.out.println(Local_WEB_site);
//		System.out.println("记得打开 phpstudy 内置的MySQL 服务器, 不然web应用没办法正常访问...");






    }
}
